const path = require('path')

module.exports = {
  // mode, 配置打包环境: development, production
  mode: 'development',

  // devtool
  devtool: 'source-map',

  // webpack-dev-server
  devServer: {
    contentBase: path.resolve(__dirname, '../dist'),
    port: 8080,
    proxy: {
      '/api': {
        target: 'https://wx.maoyan.com',
        changeOrigin: true,
        pathRewrite: {'^/api' : ''}
      }
    }
  }
}